// 0-0-0 tab1
export const columnsDataM = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        dataField: "PZYF",
        minWidth: 120,
        dataType: "number",
        caption: "月份",
        width: 100,
        alignment: "right",
    },

    {
        dataField: "JFJE",
        minWidth: 120,
        // format: 'fixedPoint',
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "借方金额合计",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "DFJE",
        minWidth: 120,
        // format: 'fixedPoint',
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "贷方金额合计",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "Diff",
        minWidth: 120,
        dataType: "number",
        dataTypeCustom: "money-number",
        caption: "差异",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "Num",
        minWidth: 120,
        dataType: "number",
        caption: "凭证数量",
        alignment: "right",
    },
    // {
    //     caption: "审定账龄",
    //     alignment: "center",
    //     columns: [
    //         // // 例如：1至3月M3(取M开头的+最后的月数)
    //     ]
    // }
];
// PZBH: 1
// PZBH_Prior: 0
// PZLX: "银付"
// PZRQ: "20210131"
// XH: "1"
// ZY: "202101转账手续费"
// gap: 0

// 0-0-0 tab2
export const columnsDataM2 = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        dataField: "YSKMBH",
        caption: "科目编号",
        minWidth: 120,
        alignment: "left",
    },
    {
        dataField: "KMMC",
        caption: "科目名称",
        width: 150,
        alignment: "left",
    },
    {
        dataField: "KMFX",
        caption: "科目方向",
        width: 150,
        alignment: "center",
    },
    {
        dataField: "QCYE",
        format: 'fixedPoint',
        minWidth: 120,
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "期初余额",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "JFLJFSE",
        format: 'fixedPoint',
        minWidth: 120,
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "借方发生额",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "DFLJFSE",
        format: 'fixedPoint',
        minWidth: 120,
        dataType: "number",
        caption: "贷方发生额",
        dataTypeCustom: "money-number",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "QMYE",
        minWidth: 120,
        dataType: "number",
        caption: "期末余额",
        dataTypeCustom: "money-number",
        alignment: "right",
    },
    {
        dataField: "Diff",
        minWidth: 120,
        format: 'fixedPoint',
        dataType: "number",
        dataTypeCustom: "money-number",
        caption: "差异",
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        width: 150,
    },
    // {
    //     caption: "审定账龄",
    //     alignment: "center",
    //     columns: [
    //         // // 例如：1至3月M3(取M开头的+最后的月数)
    //     ]
    // }
];

// 0-0-1
export const columnsDataMQ1 = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        dataField: "PZLX",
        caption: "凭证类型",
        width: 150,
        alignment: "center",
    },
    {
        dataField: "PZRQ",
        caption: "凭证日期",
        width: 200,
        alignment: "center",
    },
    {
        dataField: "PZBH",
        caption: "凭证编号",
        width: 150,
        alignment: "center",
    },
    {
        dataField: "PZBH_Prior",
        caption: "上个凭证编号",
        width: 150,
        alignment: "center",
    },
    {
        dataField: "gap",
        caption: "凭证间距",
        dataType: "number",
        format: 'fixedPoint',
        dataTypeCustom: "money-number",
        width: 150,
        alignment: "center",
    },
    {
        dataField: "ZY",
        minWidth: 120,
        caption: "摘要",
        alignment: "left",
    },
];

// 0-0-0-1
export const columnsDataMQW = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        dataField: "PKMMC",
        caption: "一级科目",
        width: 150,
        alignment: "left",
    },
    {
        dataField: "YSKMBH",
        caption: "科目编号",
        width: 150,
        alignment: "left",
    },
    {
        dataField: "KMMC",
        minWidth: 120,
        caption: "科目名称",
        alignment: "left",
    },
    {
        dataField: "JFJE",
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "借方发生额",
        width: 200,
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },

    {
        dataField: "DFJE",
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "贷方发生额",
        width: 200,
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "num",
        dataType: "number",
        caption: "分录数",
        width: 100,
        alignment: "right",
    }
];

// 0-0-0-2、0-0-0-3、0-0-0-4、0-0-0-5、
export const columnsDataMEJZ = [
    // PZID
    {
        dataField: "PZID",
        dataType: "string",
        caption: "组信息",
        width: 120,
        alignment: "center",
        groupIndex: 0,
    },
    {
        dataField: "ZY",
        caption: "摘要",
        width: 200,
        alignment: "left",
    },
    {
        dataField: "YSKMBH",
        caption: "科目编号",
        width: 160,
        alignment: "left",
    },
    {
        dataField: "KMMC",
        minWidth: 120,
        caption: "科目名称",
        alignment: "left",
    },
    {
        dataField: "JFJE",
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "借方",
        width: 100,
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "DFJE",
        dataTypeCustom: "money-number",
        dataType: "number",
        caption: "贷方",
        width: 100,
        editorOptions: {
            format: { type: 'decimal', currency: 'CNY', precision: 2 }
        },
        alignment: "right",
    },
    {
        dataField: "HSXM",
        caption: "核算项目",
        width: 200,
        alignment: "left",
    },
    {
        dataField: "dfkmmc",
        minWidth: 120,
        caption: "对方科目",
        alignment: "left",
    },
    // {
    //     caption: "审定账龄",
    //     alignment: "center",
    //     columns: [
    //         // // 例如：1至3月M3(取M开头的+最后的月数)
    //     ]
    // }
];

// 0-0-0-0 tab1
export const columnsDataMW1 = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        dataField: "name",
        minWidth: 120,
        caption: "操作用户",
        alignment: "left",
    },

    {
        dataField: "job",
        minWidth: 120,
        caption: "岗位职责",
        alignment: "left",
    },
    {
        dataField: "bill_edit_num",
        minWidth: 120,
        dataType: "number",
        caption: "编制单据数量",
        alignment: "right",
        cellRender: (cell: any) => {
            if (!cell.data.bill_edit_num || cell.data.bill_edit_num === 0) {
                return '';
            }
            return cell.data.bill_edit_num;
        }
    },
    {
        dataField: "bill_carryto_num",
        minWidth: 120,
        dataType: "number",
        // format: 'fixedPoint',
        // dataTypeCustom: "money-number",
        caption: "过账单据数量",
        alignment: "right",
        cellRender: (cell: any) => {
            if (!cell.data.bill_carryto_num || cell.data.bill_carryto_num === 0) {
                return '';
            }
            return cell.data.bill_carryto_num;
        }
    },
    {
        dataField: "bill_check_num",
        minWidth: 120,
        dataType: "number",
        // format: 'fixedPoint',
        // dataTypeCustom: "money-number",
        caption: "审核单据数量",
        alignment: "right",
        cellRender: (cell: any) => {
            if (!cell.data.bill_check_num || cell.data.bill_check_num === 0) {
                return '';
            }
            return cell.data.bill_check_num;
        }
    },
    {
        dataField: "isExistsInList",
        minWidth: 120,
        caption: "是否存在会计清单中",
        dataType: "boolean",
        alignment: "right",
    },
];

// 0-0-0-0 tab2
export const columnsCheckJob = [
    {
        caption: '序号',
        width: 30,
        allowFiltering: false,
        allowSorting: false,
        cellTemplate: function (container: any) {
            const span = document.createElement('span');
            const index = container.parentElement.getAttribute('aria-rowindex');
            span.innerText = index;
            span.classList.add('row-index');
            container.appendChild(span);
        },
    },
    {
        caption: "制单人",
        alignment: "center",
        columns: [
            {
                dataField: "TZR",
                minWidth: 120,
                caption: "姓名",
                alignment: "left",
            },
            {
                dataField: "TZR_Job",
                minWidth: 120,
                caption: "岗位职责",
                alignment: "left",
            },
        ]
    },

    {
        caption: "过账人",
        alignment: "center",
        columns: [
            {
                dataField: "JZR",
                minWidth: 120,
                caption: "姓名",
                alignment: "left",
            },
            {
                dataField: "JZR_Job",
                minWidth: 120,
                caption: "岗位职责",
                alignment: "left",
            },
        ]
    },
    {
        caption: "审核人",
        alignment: "center",
        columns: [
            {
                dataField: "SHR",
                minWidth: 120,
                caption: "姓名",
                alignment: "left",
            },
            {
                dataField: "SHR_Job",
                minWidth: 120,
                caption: "岗位职责",
                alignment: "left",
            },
        ]
    },
    {
        dataField: "billNum",
        minWidth: 120,
        dataType: "number",
        caption: "单据数量",
        alignment: "right",
        cellRender: (cell: any) => {
            if (!cell.data.billNum || cell.data.billNum === 0) {
                return '';
            }
            return cell.data.billNum;
        }
    },
];


